#ifndef __MARS_GRAPHICS_BLEND_STATE_H__
#define __MARS_GRAPHICS_BLEND_STATE_H__

#include "MarsObject.h"

using namespace Core;

namespace Graphics
{

class BlendState : public Object
{
public:
									BlendState( const D3D11_BLEND_DESC& blendDesc );
									~BlendState();

	bool							Create();
	void							Delete();

	ID3D11BlendState*				GetNativeBlendState() const;

private:
	D3D11_BLEND_DESC				m_blendDesc;
	ID3D11BlendState*				m_pBlendState;
};

inline BlendState::BlendState( const D3D11_BLEND_DESC& blendDesc )
	: m_pBlendState( NULL )
{
	MARS_MEMCPY( &m_blendDesc, &blendDesc, sizeof( D3D11_BLEND_DESC ) );
}

inline BlendState::~BlendState()
{
	Delete();
}

inline ID3D11BlendState* BlendState::GetNativeBlendState() const
{
	return m_pBlendState;
}

} // end of Graphics

#endif // end of #ifndef __MARS_GRAPHICS_BLEND_STATE_H__